A conventional auto-focus system for a video camera is described in an article entitled "Automatic focus adjustment for TV cameras by hill-climbing servomechanism", by J. Ishida and Y. Fujimura, NHK Technical Research, Vol. 17, No. 1, 1965, pp. 21-37. This system uses what is often referred to as "contrast autofocus", where the lens focus position is adjusted automatically until the contrast of the edge detail in the image, or a particular area of the image, is maximized. This type of autofocus is also known as "hill climbing" autofocus because it generates a sequence of values that increase in level until they pass over a peak, i.e., a "hill".
In order to increase focusing response time without sacrificing focusing precision, it is common to use not only the higher frequency component of the video signal, but also the lower frequency component. For example, in Japanese patent application no. 50-158327, published Dec. 22, 1975, a lens is quickly driven in coarse adjustment steps in a low frequency range furthest from the maximum focus, and then driven in finer adjustment steps in a high frequency range nearer to the maximum focus.
FIG. 1 shows a known infinite impulse response (IIR) filter block diagram useful in the known types of autofocus systems to isolate either a higher frequency component or a lower frequency component of a signal. This IIR filter includes ten multipliers 2-1 to 2-10 which generate the output signal. The filter function is obtained by each multiplier implementing a coefficient unique to the particular digital filter function, thereby providing the particular frequency characteristic of the filter. The ten coefficients are applied to the input signal, which is suitably delayed by four delay elements 4-1 to 4-4. The multiplied values are then summed in four summers 6-1 to 6-4, and then output as the filtered signal.
While the coefficient values implemented by the multipliers 2-1 to 2-10 remain the same for all the pixels of an image, the values may be programmed differently for different images, or for different passes through the same image. For example, FIGS. 2 and 3 show two different bandpass filter characteristics which can be implemented by programming different coefficients. FIG. 2 shows a lower frequency bandpass filter characteristic, which could be used to implement the coarse adjustment described in the aforementioned Japanese patent application 50-158327. Similarly, the finer adjustment described in that application could be implemented by programming the filter coefficients to provide the higher frequency bandpass filter characteristic shown in FIG. 3. Another example of filter switching at the image level is shown in U.S. Pat. No. 4,975,726, where filter coefficients are switched as the image luminance or the camera aperture is changed.
A flow diagram of a conventional autofocus algorithm is shown in FIG. 4. This algorithm uses the "hill climbing" contrast autofocus method discussed above and shown in the diagram of FIG. 5, which illustrates the relationship between the focus value obtained from the filters and the lens position. In FIG. 5, the abscissa indicates the focusing position of a lens along a distance axis, the ordinate indicates the focusing evaluation value, and the curves A and B indicate the focusing evaluation values for high and low frequency components, respectively, relative to a particular in-focus position P.
Referring to the flow diagram of FIG. 4, the best starting point for the algorithm depends on the hyperfocal distance of the current lens setting, which is a function of the focal length setting and the f-number. A distance of about 2 meters is typically a good starting point. Then the low frequency bandpass filter is loaded (stage 7) and the focus values are read out. The algorithm employs a comparison stage 8 to set the direction of lens adjustment toward increasing focus values, and to determine when the lens is stepped over the "hill". The depth of field, which depends on the present focal length and f-number, sets the number of steps, i.e., the next near focus position, which should be taken before capturing the next frame when using the low frequency bandpass filter. Once the peak of the hill is passed, the high frequency bandpass filter is loaded (stage 9), and the lens is moved in the opposite direction until the peak of the higher "hill" is found (curve A in FIG. 5). The peak focus value may use either the weighted average or peak value from numerous pixels.
Although programming the same filter for both low frequency and high frequency bandpass characteristics reduces the number of coefficient multipliers, delays, and adders by half (by using one filter instead of two), there are still a lot of components involved in these digital designs. For example, it would be customary for the circuit of FIG. 1 to use about 20,000 gates if implemented using an application specific integrated circuit (ASIC). Clearly, it is still desirable to further reduce the number of components used in a specific application. Since most of the gates are due to multipliers, it is especially desirable to reduce the number of multipliers.